<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<TITLE>{title}的短评 - {SITENAME}</TITLE>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<meta name="keywords" content="{title},{title},短评,评论,观后感"/>
<meta name="description" content="{title}短评" />
<LINK rel=stylesheet type=text/css href="{PUB}css/global.css">
<LINK rel=stylesheet type=text/css href="{PUB}css/packed_douban53.css">
<LINK rel=stylesheet type=text/css href="{PUB}css/packed__all12.css">
<link rel="stylesheet" type=text/css href="{PUB}css/re.css"  />
<link href="{PUB}css/jquery.ui.all/jquery.ui.all.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="{PUB}js/jquery.min4.js"></script>
<script type="text/javascript" src="{PUB}js/rating.js"></script>
<script type="text/javascript" src="{PUB}js/dialog.js"></script>
<script type="text/javascript" src="{PUB}js/re.js"></script>
<script src="{PUB}js/jquery-ui.min.js"></script>
</head>
<body>
<!-- INCLUDE ../header.htm -->
<div id="content">
<h1>{title} 短评</h1>
<div class="grid-16-8 clearfix">
	<div class="article">
	<span>{mtips}</span>
	<div>
<script type="text/javascript">

function voteComment(cid){
	votes = $.ajax({url:"/movie/comments/vote/" + cid,async:false});
	result = votes.responseText;
	if (result == 'ok'){
		val = parseInt($("#vote_"+cid)[0].value);
		$("#vote_val_"+cid).html(val + 1);
	}else{
		$.fn.jmodal({title: '短评投票',content: '<BR>'+result+'<BR><BR>'});	
		window.setTimeout($.fn.hideJmodal,700);
	}
}

function checkNum (){
	var text1 = document.getElementById("comment").value;
	if(text1 == '请选择星星给电影评分'){
		document.getElementById("comment").value = '';
	}
	if(text1 == ''){
		document.getElementById("comment").value = '请选择星星给电影评分';
	}
	var len;
	var olen = 140;
	if(text1.length >= olen){
		$("#countTxt").html('<span style="color:red">0</span>');
		document.getElementById("comment").value = text1.substr(0,olen);		
	}else{ 
		$("#countTxt").html('<span style="color:green">'+(olen - text1.length)+'</span>');
	}	   
}

</script>


<!--写短评-->	
	<!-- IF myComment -->
	<h2>修改短评</h2>
	<div class="indent"><span>{mtips}</span>
	<script type="text/javascript">
	$(function() {
		$('#rating').raty({
			half: true,
			start:{myComment.rating},
			click: function(score) {
				if(document.getElementById("comment").value == '' || document.getElementById("comment").value == '请选择星星给电影评分'){
					document.getElementById("comment").value = '我给电影《{title}》评分是:' + score * 2 + '分。';
				}
			}
		});
		checkNum();
		{myComment.isWish}
	});	
	function watchAction (id){ 
		if(id == '2'){
			$("#collectBox").hide('fast');
		}else{
			$("#collectBox").show('fast');
		}
	}
	</script>
	<form name="comments" method="post" action="/movie/comments/edit/{myComment.id}">
	<div id="collectBox">我看了，我的评分是：<span id="rating"></span></div>
	<div style="margin-top:10px">
		<div style="float:left;width:100px">
			<label><input type="radio" name="watch_action" value="1"{myComment.collected}onclick="watchAction('1');"/>看了</label>         
			<label><input type="radio" name="watch_action" value="2"{myComment.wished}onclick="watchAction('2');"/>想看</label>
			<div style="margin-top:70px;font-size:14px"><a href="/review/new/{id}/">写详细影评 &raquo;</a></div>			
		</div>
		<div style="float:left;;width:485px;text-align:right">
			<textarea class="textarea" name="content" id="comment" style="width:460px;height:75px;margin:0px" onKeyUp="checkNum()" onblur="checkNum()" onfocus="checkNum()" >{myComment.contents}</textarea>			
			<label style="color:#999;">还能输入 <span id="countTxt" style="font-size:18px;color:green" >140</span> 个字</label>
			<input type="submit" class="btn" value="修改短评"/>
		</div>
	</div>
	</form>
	<!-- ELSE -->
	<h2>写短评……</h2>
	<div class="indent"><span>{mtips}</span>
	<script type="text/javascript">
	$(function() {
		$('#rating').raty({
			half: true,
			click: function(score) {
				document.getElementById("comment").value = '我给电影《{title}》评分是:' + score * 2 + '分。';
			}
		});
	});
	function watchAction (id){ 
		if(id == '2'){
			document.getElementById("comment").value = '我想看电影《{title}》。';
			$("#collectBox").hide('fast');
		}else{
			document.getElementById("comment").value = '请选择星星给电影评分。';
			$("#collectBox").show('fast');
		}
	}
	</script>
	<form name="comments" method="post" action="/movie/comments/new/{id}">
	<div id="collectBox">我看了，我的评分是：<span id="rating"></span></div>
	<div style="margin-top:10px">
		<div style="float:left;width:100px">
			<label><input type="radio" name="watch_action" value="1" checked="checked" onclick="watchAction('1');"/>看了</label>         
			<label><input type="radio" name="watch_action" value="2" onclick="watchAction('2');"/>想看</label>
			<div style="margin-top:70px;font-size:14px"><a href="/review/new/{id}/">写详细影评 &raquo;</a></div>
			
		</div>
		<div style="float:left;;width:485px;text-align:right">
			<textarea class="textarea" name="content" id="comment" style="width:460px;height:75px;margin:0px" onKeyUp="checkNum()" onblur="checkNum()" onfocus="checkNum()" >请选择星星给电影评分</textarea>			
			<label style="color:#999;">还能输入 <span id="countTxt" style="font-size:18px;color:green" >140</span> 个字</label>
			<input type="submit" class="btn" value="写短评"/>
		</div>
	</div>
	</form>
	<!-- ENDIF myComment -->
	</div></div>
	<div class="clear"></div>

<div class="tab_area">
	<div class="fright"><span class="color_gray">共 {total} 条短评</span><span class="pl"></span></div>
	<ul class="tabs">
		<li><a href="/movie/{id}/comments" title="cBox_1" class="tab {newCommentTab} cTab" onfocus="this.blur()">最新的</a></li>
		<li><a href="/movie/{id}/comments/hot" title="cBox_3" class="tab {hotCommentTab} cTab" onfocus="this.blur()">热门的</a></li>  <!-- 新增热门微博数据-->
		<li><a href="/movie/{id}/comments/friend" title="cBox_2" class="tab {friendCommentTab} cTab"  onfocus="this.blur()">朋友的</a></li>
	</ul> 		
    <div class="content cBox">
	<!-- IF commentList -->
		<ul class="simple_list" id='all_comment'>
			<!-- BEGIN commentList -->
			<li class="clearfix">
				<div class="userface"><a href="/people/{uid}/" target="_blank"><img src="{profile_image_url}" /></a></div> <!-- 原来的 {PUB}avatars/{avatars}-->
				<div class="comment">
					<h3 class="clearfix color_gray">
					<input id="vote_{id}" value="{support}" type="hidden"/>
						<span class="fright">
						<span class="votes pr5" id="vote_val_{id}"><!--{support} 隐藏--></span><a href="javascript:;" onclick="voteComment({id});"><!-- 有用   隐藏--></a></span>  
						<span class="fleft"><a href="/people/{uid}/" target="_blank">{username}</a></span>
						<span class="fleft ml8">{addtime}</span>
						<span class="stars{stars}"></span>
					</h3>
					<div id="message_{weibo_id}">{contents}</div>
				</div>
				</br>
				<div align="right" id="{weibo_id}"><a href="javascript:rt({weibo_id},{mid})" value="" title="转发到新浪微博" >转发(<span id="rt_sum{weibo_id}">{rt}</span>)</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a >收藏</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp; <a href="javascript:Comment({weibo_id},{mid})" value=""  title="评论到新浪微博" >评论(<span id="re_sum{weibo_id}">{comments}</span>)</a></div>
			</li>
			<!-- END commentList --> 
		</ul>
		{pages}
	<!-- ELSE -->
		{friendCommentTip}
	<!-- ENDIF commentList -->
	</div>
	<div class="clear"></div>
</div>



		
	</div>

	<div class="aside">
		<p class="pl2">&gt; <a href="/movie/{id}/">去{title}的页面</a></p>
		{descs}
	</div>
</div>

<!-- INCLUDE ../footer.htm -->       
</body></html>